package com.ysq.hebt.timmer;

import java.net.URL;
import org.apache.log4j.Logger;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import com.ysq.hebt.common.config.ConfigInfo;
import com.ysq.hebt.common.util.CommonUtil;

/**
 * 唤醒定时器
 * @author ysq
 *
 */
public class AwakeTimmer {
	
	Logger logger = CommonUtil.getLogger(this.getClass());
	
	/**
	 * 定时唤醒项目
	 */
	public void callProject() {
		if (ConfigInfo.awakeTimmerStatus) {
			String url = ConfigInfo.webRootUrl;
			try {
				URL u = new URL(url);
				Document htmlDoc = Jsoup.parse(u, 4000);
				
				if (htmlDoc != null) {
					logger.debug("success ... ");
				}
			} catch (Exception e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
	}
}
